package com.java8.lockTest.test3;

/**
 * <p>Description: [可重入锁-代码示例]</p>
 * Created on 2020/5/26
 *
 * @author <a href="mailto: 819712047@qq.com">谢振东 </a>
 * @version 1.0
 */
public class Test0 implements Runnable {

    public void get() {
        System.out.println(Thread.currentThread().getId());
        set();
    }

    public void set() {
        System.out.println(Thread.currentThread().getId());
    }

    @Override
    public void run() {
        get();
    }

    public static void main(String[] args) {
        Test0 ss = new Test0();
        new Thread(ss).start();
        new Thread(ss).start();
        new Thread(ss).start();
    }

}
